<?php

namespace app\common\model\driving;

use think\Model;

/**
 * 司机邀请模型
 */
class DriverInvite extends Model
{





    // 表名
    protected $name = 'driving_driver_invite';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
    ];

    // 字段类型或者格式转换
    protected $type = [
        'createtime' => 'datetime:Y-m-d H:i:s',
    ];


    protected static function init()
    {
        self::beforeInsert(function ($row) {
            $changed = $row->getChangedData();
        });

        self::beforeUpdate(function ($row) {
            $changed = $row->getChangedData();
        });

        self::afterInsert(function ($row) {
            $changed = $row->getChangedData();
        });

        self::afterUpdate(function ($row) {
            $changed = $row->getChangedData();
        });
    }

}
